pp108 : prompt() Method

prompt() Method

 


This method displays prompt messages that require inputs from the user.

Syntax

application.prompt(sMessage, [sDefaultValue], [fpCallBackHandler], [bOnCordysRoot], [sTitle]);

Parameters

Return Value

Returns a string containing the value that you provide.
Returns null if you press the Cancel button or close the prompt message.

Remarks

The prompt messages display OK and Cancel buttons. If you use the close icon in the toolbar to close the prompt message, it results in a cancel action.
An application can display only one prompt message at a time. Multiple prompts can be combined as successive options.

Example

function callPrompt()
{
    application.prompt("Enter the name of the method to be created", "GetAllOrders", closeHandler, false, "New Method");
}

function closeHandler(methodName)
{
The logic of what to do with the given input methodName.
}